//
//  ContactTableViewCell.m
//  17-Homework
//
//  Created by dllo on 16/8/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ContactTableViewCell.h"
#import "Contact.h"
@interface ContactTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *contactImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@end

@implementation ContactTableViewCell

- (void)setContact:(Contact *)contact {
    _contact = contact;
    NSData *imageData = [NSData dataWithContentsOfFile:contact.imagePath];
    _contactImageView.image = [UIImage imageWithData:imageData];
    _nameLabel.text = contact.name;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
